/**
 * © 2009 Susanta Tewari
 * This file is part of genomemap.
 *
 * genomemap is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * genomemap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with genomemap.  If not, see <http://www.gnu.org/licenses/>.
 */
package genomemap.util;

/**
 * @version 1.0 Jun 5, 2010
 * @author Susanta Tewari
 */
public class PropertyUtil {

    /**
     * A property is deemed valid if it is not <code>null</code> and has a non-empty value.
     * @param prop property
     * @param value value of the property
     * @throws RuntimeException if validation fails
     */
    public static void validateProperty(String prop, String value) {

        if (value == null || value.length() == 0)
            throw new RuntimeException("property " + prop + "=" + value);
    }

}
